
#import "SEGOwesBillDetailModel.h"
@implementation SEGOwesBillDetailModel
- (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dictionary];
    }
    return self;
}
- (instancetype)init
{
    self = [super init];
    if (self) {
        _cycleAmount = @"";
        _billingStr = @"";
        _monthDetail = [NSArray<SEGOwesMonthDetailModel*> array];
        _billDetail = [NSArray<SEGOwesMonthDetailModel*> array];
        _billingCycle = @"";
        _feeAmount = @"";
        _disAmount = @"";
    }
    return self;
}
+ (instancetype)initWithDictionary:(NSDictionary*)dictionary
{
    return [[self alloc] initWithDictionary:dictionary];
}
- (void)setValue:(id)value forUndefinedKey:(NSString*)key
{
}

- (void)setValue:(id)value forKey:(NSString*)key
{

    if ([key isEqualToString:@"monthDetail"]) {
        NSMutableArray* _arrM = [NSMutableArray array];
        for (NSDictionary* dict in value) {
            SEGOwesMonthDetailModel* model = [SEGOwesMonthDetailModel yy_modelWithDictionary:dict];
//            SEGOwesMonthDetailModel* model = [SEGOwesMonthDetailModel initWithDictionary:dict];
            [_arrM addObject:model];
        }
        _monthDetail = _arrM.copy;
        return;
    }

    if ([key isEqualToString:@"billDetail"]) {
        NSMutableArray* _arrM = [NSMutableArray array];
        for (NSDictionary* dict in value) {
            SEGOwesMonthDetailModel* model = [SEGOwesMonthDetailModel yy_modelWithDictionary:dict];
//            SEGOwesMonthDetailModel* model = [SEGOwesMonthDetailModel initWithDictionary:dict];
            [_arrM addObject:model];
        }
        _billDetail = _arrM.copy;
        return;
    }

    [super setValue:value forKey:key];
}
- (void)setCycleAmount:(NSString*)cycleAmount
{
    _cycleAmount = [[SEGUtils ValueToString:cycleAmount] copy];
}
- (void)setBillingStr:(NSString*)billingStr
{
    _billingStr = [[SEGUtils ValueToString:billingStr] copy];
}

- (void)setBillingCycle:(NSString*)billingCycle
{
    _billingCycle = [[SEGUtils ValueToString:billingCycle] copy];
}

- (void)setFeeAmount:(NSString*)feeAmount
{
    _feeAmount = [[SEGUtils ValueToString:feeAmount] copy];
}

- (void)setDisAmount:(NSString*)disAmount
{
    _disAmount = [[SEGUtils ValueToString:disAmount] copy];
}
@end
